import {request} from "./request";

export function getDataNum() {
  return request({
    url: '/getdatanum',
    method:'get'
  })
}

export function getTableData(page) {
  return request({
    url: '/api/profiles',
    method:'get',
    params: {

    }
  })
}

export function changeTableData(page) {
  return request({
    url: '/getpost',
    method:'get',
    params: {
      page
    }
  })
}

export function deleteTableData(id) {
  return request({
    url: '/api/profiles/delete',
    method: 'delete',
    params: {
      id
    }
  })
}


export function updateTableData(id, build, classroom, result, note, solver) {
  return request({
    url: '/api/profiles/edit',
    method: 'post',
    params: {
      id,
      build,
      classroom,
      result,
      note,
      solver
    }
  })
}

export function conditionGet(date, build, page) {
  return request({
    url: '/api/profiles',
    method:'get',
    params: {
      date,
      build,
      page
    },

  })
}

export function getConditionNum(date, build) {
  return request({
    url: '/api/profiles/count',
    method:'get',
    params: {
      date,
      build
    }
  })
}

export function fileExport(date, build) {
  return request({
    url: '/api/profiles/file_export',
    method:'get',
    params: {
      date,
      build
    }
  })
}
